<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="./images/logo.png" rel="icon">
    <title>中国烟草总公司福建省公司机关服务平台</title>
</head>
<body class="bodyStyle">
    <div class="groundStyle">
        <div>
            <img  src="./images/title.png" class="titleDiv" />
        </div>
        <div class="app" onclick="goto('app/main')">

        </div>
        <div id="show"></div>
        <div class="videoStyle">
            <video autoplay muted loop style="margin: 0 auto; width: 100%;">
                <source src="./images/bg.mp4" type="video/mp4" />
            </video>
        </div>
        <div class="barStyle">
            <div class="divStyle">
                <img  src="./images/bg1.png" class="imgStyle" onclick="goto('web/lock/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg2.png"  class="imgStyle" onclick="goto('web/diningRoom/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg3.png" class="imgStyle" onclick="goto('web/asset/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg4.png" class="imgStyle" onclick="goto('web/officeSupplies/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg5.png"  class="imgStyle" onclick="goto('web/car/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg6.png"  class="imgStyle" onclick="goto('web/property/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg7.png"  class="imgStyle" onclick="goto('web/reception/')" />
            </div>
            <div class="divStyle">
                <img  src="./images/bg8.png" class="imgStyle" onclick="goto('web/synthesize/')" />
            </div>
        </div>
    </div>
</body>
</html>
<style>
    .bodyStyle {
        overflow: hidden
    }
    .titleDiv {
        width: 100%;
        position: absolute;
        z-index: 1
    }
    .videoStyle {
        position: absolute;width: 100%;height: 100%;z-index: -1
    }
    .groundStyle {
        width: 100%;
        height: 100%;
        background-image: url(./images/bg.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
        position: absolute;
        top: 0px;
        bottom: 0px;
        z-index: -2;
    }
    .barStyle {
        width: 90%;
        margin: 240px auto;
        z-index: 10000000000;
    }
    .divStyle {
        width: 21%;
        display: inline-block;
        margin: 20px;
        text-align: center;
    }
    .imgStyle {
        width: 200px;
        height: 250px
    }
    #show {
        width: 360px;
        position: absolute;
        color: #328BBC;
        font-size: 30px;
        left: 20px;
        top: 28px
    }
    .app {
        width: 50px;
        height: 50px;
        background-image: url(./images/app.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 2;
    }
</style>
<script type="text/javascript">
    var show = document.getElementById("show");
    setInterval(function () { showTime(); }, 1000);
    function showTime() {
        var time = new Date();
        var year = time.getFullYear();
        var month = time.getMonth() + 1; //获取的月份数值在 0～11 即数值需要加一
        var day = time.getDate();
        var hour = time.getHours();
        var minute = time.getMinutes();
        var second = time.getSeconds();
        //判断分钟的数值是否为个位数，如果是则在数值前加0
        if (minute < 10) {
            minute = "0" + minute;
        }
        //判断秒的数值是否为个位数，如果是则在数值前加0
        if (second < 10) {
            second = "0" + second;
        }
        var timer = year + "年" + month + "月" + day + "日" + "&nbsp;&nbsp" + hour + ":" + minute + ":" + second;
        show.innerHTML = timer;
    }
    //加载页面时执行一次
    changeMargin();
    //监听浏览器宽度的改变
    window.onresize = function(){
        changeMargin();
    };
    function changeMargin(){
        //获取网页可见区域宽度
        var docWidth = document.body.clientWidth;
        if(docWidth <= 1600){
            document.getElementById('show').style.fontSize = '20px';
        }else {
            document.getElementById('show').style.fontSize = '30px';
        }
    }

    function goto(url) {
        var href = window.location.href;
        var index = href.indexOf('web');
        var base = href.slice(0, index);
        window.open( base + url);
    }

</script>

